<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>赋值运算符</title>
</head>
<body>
  <script>
    //声明一个变量
    var a; //初始值是 undefined

    //为 a 赋值 100;
    a = 100;

    //+=
    a += 20;// 等同于 a = a + 20; 在变量原来值的基础上增加 20

    //-=
    a -= 10;// 等同于 a = a - 10;

    console.log(a);


  </script>
</body>
</html>